package main

import "fmt"

func main() {
	intChan := make(chan int, 100)
	for i := 0; i < 100; i++ {
		intChan <- i * 2
	}
	//遍历时，不能使用普通for循环，用for range
	close(intChan)
	for value := range intChan {
		fmt.Println(value)
	}
}
